from django.contrib import admin
from gxdm.models import *
from gxdm.resources.DwbmdmResource import DwbmdmResource
from gxdm.resources.MzdmResource import MzdmResource
from gxdm.resources.ZzmmdmResource import ZzmmdmResource
from import_export.admin import ImportExportModelAdmin, ExportActionModelAdmin


# Register your models here.
@admin.register(Dqrzztdm)
class DqrzztdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']


@admin.register(Dwbmdm)
class DwbmdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label', 'label_en', 'parent_id']
    list_filter = ['value', 'label', 'parent_id']
    search_fields = ['value', 'label']
    ordering = ('value', )
    resource_class = DwbmdmResource


@admin.register(Gxjzglydm)
class GxjzglydmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Jzglbdm)
class JzglbdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Mzdm)
class MzdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)

    resource_class = MzdmResource


@admin.register(Mzfsdm)
class MzfsdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Pyccdm)
class PyccdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Pyfsdm)
class PyfsdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Sfzjlxdm)
class SfzjlxdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Xbdm)
class XbdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Xldm)
class XldmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Xsdqztdm)
class XsdqztdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Xslbdm)
class XslbdmAdmini(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Xwdm)
class XwdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Xzqydm)
class XzqydmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Zwjbdm)
class ZwjbdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Zwlbdm)
class ZwlbdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Zyjszwdm)
class ZyjszwdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)


@admin.register(Zzmmdm)
class ZzmmdmAdmin(ExportActionModelAdmin):
    list_display = ['value', 'label']
    ordering = ('value',)
    resource_class = ZzmmdmResource
